package com.haoniu.module.service.impl;

import com.haoniu.common.support.Convert;
import com.haoniu.module.domain.database.WelfareRoom;
import com.haoniu.module.mapper.WelfareRoomMapper;
import com.haoniu.module.service.WelfareRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 福利房 服务层实现
 * 
 * @author houyijun
 * @date 2019-04-22
 */
@Service
public class WelfareRoomServiceImpl implements WelfareRoomService
{
	@Autowired
	private WelfareRoomMapper welfareRoomMapper;

	/**
     * 查询福利房信息
     * 
     * @param id 福利房ID
     * @return 福利房信息
     */
    @Override
	public WelfareRoom selectWelfareRoomById(Integer id) {
	    return welfareRoomMapper.selectWelfareRoomById(id);
	}
	
	/**
     * 查询福利房列表
     * 
     * @param welfareRoom 福利房信息
     * @return 福利房集合
     */
	@Override
	public List<WelfareRoom> selectWelfareRoomList(WelfareRoom welfareRoom) {
	    return welfareRoomMapper.selectWelfareRoomList(welfareRoom);
	}
	
    /**
     * 新增福利房
     * 
     * @param welfareRoom 福利房信息
     * @return 结果
     */
	@Override
	public int insertWelfareRoom(WelfareRoom welfareRoom) {
	    return welfareRoomMapper.insertWelfareRoom(welfareRoom);
	}
	
	/**
     * 修改福利房
     * 
     * @param welfareRoom 福利房信息
     * @return 结果
     */
	@Override
	public int updateWelfareRoom(WelfareRoom welfareRoom) {
	    return welfareRoomMapper.updateWelfareRoom(welfareRoom);
	}

	/**
     * 删除福利房对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWelfareRoomByIds(String ids) {
		return welfareRoomMapper.deleteWelfareRoomByIds(Convert.toStrArray(ids));
	}
	
}
